<?php
// $Id: SubmitInput.php 27 2010-11-16 12:49:54Z mjohnson60@gmail.com $


/**
 * Enter description here ...
 * 
 * @author markjohnson
 * @version 1.0
 * @copyright Copyright (c) 2010, markjohnson
 * @license http://www.gnu.org/licenses/gpl.html The GNU General Public License v3.0
 *
 */
class SubmitInput extends ButtonInput
{

	/**
	 * Enter description here ...
	 * 
	 * @param string $name
	 * @param string $value
	 * @param string $id
	 * @param array $attributes
	 * @param FormElement $parent
	 */
	function __construct($name, $value, $id = NULL, $parent = NULL, $attributes = array())
	{
		$this->render = 'submit';
		
		parent::__construct('submit', $value, $id, $parent, $attributes, 'submit');
	}

	/* 
	 * @see FormElement::_compile()
	 */
	public function _compile()
	{
		return $this->render();
	}

	/* 
	 * @see ButtonInput::render()
	 */
	public function render()
	{
		$this->name = 'submit';
		$this->button_type = 'submit';
		
		return parent::render();
	}
}